﻿<?xml version="1.0" encoding="utf-8" ?>
<DataScripter XmlInterpreter="DataScripter.UI.XmlEngineConfiguratorv3, DataScripter.UI">

  <InputSource Name="Database" Type="SqlServer" >
    <ConnectionString>Data Source=.;Initial Catalog=TD;Integrated Security=True</ConnectionString>
    <DataProducer Name="dp" Type="DataScripter.Scripting.Query.SqlServer.DataProducer, DataScripter" />
    <Db Name="Db" Type="DataScripter.Database.SqlServer.SqlServerDb, DataScripter" />
    <DatabaseStructure Name="ds" Type="DataScripter.Database.SqlServer.SqlServerDatabaseStructure, DataScripter" />
  </InputSource>

  <Output Name="File" Type="File">
    <Path>OutputScript.SQL</Path>
    <OutputProducer Name="op" Type="DataScripter.Scripting.Output.Sql.SqlServer.SqlServer2008.InsertOutputProducer, DataScripter" />
  </Output>

  <ScriptRequest Source="Database" Destination="File" />
  <ScriptDefinition Name="Script voor Burt" >
    <!-- Where can also be specified as an attribute-->
    <Table Name="TermAccountActor">
      <Where Clause="ActorID IN (select ActorID from Actor where CustomerNumber=274042)" />
      <Lookup Name="ActorID" LookupTable="Actor" LookupField="CustomerNumber"/>

      <Table Name="TermAccount" >
        <Table Name="Account" >
          <Or>
            <FilterByForeignKey Name="TermAccount_CapitalAccount_FK" />
            <FilterByForeignKey Name="TermAccount_InterestAccount_FK" />
          </Or>
        </Table>
        <Table Name="TermInvestment" />
      </Table>

      <Table Name="TermAccountActorHistory" JoinOn="TermAccountActorID" />

    </Table>
  </ScriptDefinition>

</DataScripter>
